<!DOCTYPE html>
<!--[if IE 8 ]>
<html class="ie ie8" lang="en"> <![endif]-->
<!--[if (gte IE 9)|!(IE)]><!-->
<html lang="en" xmlns="http://www.w3.org/1999/xhtml"
      xmlns:th="http://www.thymeleaf.org"><!--<![endif]-->
<head>

    <!-- Basic Page Needs
    ================================================== -->
    <meta charset="utf-8"/>
    <title>待收货</title>

    <!-- Mobile Specific Metas
    ================================================== -->
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"/>

    <!-- CSS
    ================================================== -->
    <link rel="stylesheet" href="css/style.css" th:href="@{/css/style.css}"/>
    <link rel="stylesheet" href="css/colors/green.css" th:href="@{/css/colors/green.css}" id="colors"/>

    <!--[if lt IE 9]>
    <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
    <![endif]-->

</head>

<body class="boxed">
<div id="wrapper">


    <!-- Header
        ================================================== -->
    <div th:replace="fragments/header :: header"></div>


    <!-- Titlebar
        ================================================== -->
    <section class="titlebar">
        <div class="container">
            <div class="sixteen columns">
                <h2>待收货订单</h2>

                <div th:replace="fragments/accountbar :: accountbar"></div>

            </div>
        </div>
    </section>


    <!-- Container -->
    <div th:each="order,orderStat : ${orders}">

        <div class="container cart">

            <div class="sixteen columns">

                <!-- Cart -->
                <table class="cart-table responsive-table">

                    <tr>
                        <th th:text="'订单号：' + ${order.order.order_id}"></th>
                        <th></th>
                        <th></th>
                        <th></th>
                        <th></th>
                    </tr>

                    <!-- Item -->
                    <tr th:each="item,itemStat : ${order.items}">
                        <td>
                            <div class="happy-clients-photo"><img th:src="@{'/images/' + ${item.order_item_image} }" alt=""/></div>
                        </td>
                        <td class="cart-title"><a href="#" th:text="${item.order_item_name}"></a></td>
                        <td th:text="'¥' + ${item.order_item_price}"></td>
                        <td th:text="${item.order_item_num}"></td>
                        <td class="cart-total" th:text="'¥' + ${item.order_item_total_price}"></td>
                    </tr>

                </table>

                <!-- Apply Coupon Code / Buttons -->
                <table class="cart-table bottom">

                    <tr>
                        <th>

                            <div class="tab-content"
                                 th:with=" total = (${order.order.item_total_price} + ${order.order.post_fee}) "
                                 th:text="'实付：¥' + ${#numbers.formatDecimal(total, 0, 2)} + '，收货人：' + ${order.order.receiver_name} + '，联系方式：' + ${order.order.receiver_phone} + '，收货地址：' + ${order.order.receiver_address}">
                            </div>

                            <div class="cart-btns">
                                <a href="#" class="button color cart-btns proceed">查看物流</a>
                                <a th:href="@{/receiveOrder(order_id = ${order.order.order_id})}" class="button color cart-btns proceed">确认收货</a>
                            </div>

                        </th>
                    </tr>

                </table>

            </div>

        </div>

        <div class="margin-top-40"></div>

    </div>


    <!-- Footer
        ================================================== -->
    <div th:replace="fragments/footer :: footer"></div>


</div>


<!-- Java Script
================================================== -->
<div th:replace="fragments/scripts :: scripts"></div>


<!-- Style Switcher
================================================== -->
<div th:replace="fragments/styleswitcher :: styleswitcher"></div>


</body>
</html>